package sng.modules.view.components.city.state
{
	/**
	 * 
	 * @author leonliu
	 * 建筑状态枚举类
	 * 
	 */	
	public class EnumBuildState
	{
		/**
		 *新建好 
		 */		
		public static const NEW_STATE:uint = 0;//BuildNewState
		/**
		 *正常状态 
		 */		
		public static const NORMAL_STATE:uint = 1;
		/**
		 *收获状态 
		 */		
		public static const GATHER_STATE:uint = 2;
		/**
		 *移动状态 
		 */		
		public static const MOVE_STATE:uint = 3;
		/**
		 *需要供货状态 
		 */		
		public static const SUPPLYGOODS_STATE:uint = 4;
		/**
		 *提供服务状态 
		 */		
		public static const SUPPLYSERVICES_STATE:uint = 5;
		/**
		 *枯萎状态 
		 */		
		public static const WITHERED_STATE:uint = 6;
		/**
		 *闲置状态 
		 */		
		public static const IDLE_STATE:uint = 7;
		
		
		
		
		/**
		 * 通过状态id获取状态类
		 * @param _id 数据存储的城市状态，数值型
		 * @return 城市状态类
		 * 
		 */		
		public static function getStateById(_id:int):IBuildState
		{
			switch(_id)
			{
				case NEW_STATE:
				{
					return new BuildNewState();
					break;
				}
					
				case NORMAL_STATE:
				{
					return new BuildNormalState();
					break;
				}
					
				case GATHER_STATE:
				{
					return new BuildGatherState();
					break;
				}
					
				case MOVE_STATE:
				{
					return new BuildMoveState();
					break;
				}
				case SUPPLYGOODS_STATE:
				{
					return new BuildSupplyGoodsState();
					break;
				}
				case SUPPLYSERVICES_STATE:
				{
					return new BuildSupplyServicesState();
					break;
				}
				case WITHERED_STATE:
				{
					return new BuildWitheredState();
					break;
				}
				case IDLE_STATE:
				{
					return new BuildIdleState();
					break;
				}
				
				default:
				{
					return null;
					break;
				}
			}
		}

		
		
	}
	
	
}